﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoreEx.Database.Query
{
    /// <summary>
    /// Represents a list of expressions that can be evaluated as a single <see cref="IExpression"/>.
    /// </summary>
    public interface IExpressionList : IExpression
    {
        /// <summary>
        /// Adds a <see cref="IExpression"/> to the list.
        /// </summary>
        /// <param name="expression">The <see cref="IExpression"/> to add to the list.</param>        
        IExpressionList Add(IExpression expression);
        
        /// <summary>
        /// Adds a list of <see cref="IExpression"/> instances to the list.
        /// </summary>
        /// <param name="expressions"></param>        
        IExpressionList AddRange(IEnumerable<IExpression> expressions);
                
        /// <summary>
        /// Gets the list that contains <see cref="IExpression"/> instances.
        /// </summary>
        IEnumerable<IExpression> Expressions { get; }
    }
}
